#
# admin.py - admin routines for addministering the application
#
# ====================================================================
# Copyright (c) 2008-2009 Autelic.  All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
# 
# This software consists of voluntary contributions made by many
# individuals.  For exact contribution history, see the revision
# history and logs, available at http://code.google.com/p/autelicdemoapp
# ====================================================================
# 

import cgi

from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext import db
import os
from google.appengine.ext.webapp import template

class MainPage(webapp.RequestHandler):
  def get(self):

    header_text = 'An error has occurred, please follow the link below to return to the home page'

    url = '/'
    url_linktext = 'Return to home page'

    template_values = {
      'header_text': header_text,
      'url': url,
      'url_linktext': url_linktext,
      }

      path = os.path.join(os.path.dirname(__file__), 'landing.html')
      self.response.out.write(template.render(path, template_values))

application = webapp.WSGIApplication(
                                     [('/', MainPage),
                                      ('/sign', Guestbook)],
                                     debug=True)

def main():
  run_wsgi_app(application)

if __name__ == "__main__":
  main()
